package com.niiwoo.activity.stage.enums.invite;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * tjb
 * 被邀请人与邀请人的关系：一级、二级
 */
@AllArgsConstructor
@Getter
public enum InviteeLevelEnum {

    LEVEL1(Byte.valueOf("1"), "一级管"),
    LEVEL2(Byte.valueOf("2"), "二级");

    private Byte code;
    private String desc;

    public static InviteeLevelEnum valueOf(Byte code) {
        for (InviteeLevelEnum yesOrNoEnum : InviteeLevelEnum.values()) {
            if (code.byteValue() == yesOrNoEnum.getCode()) {
                return yesOrNoEnum;
            }
        }
        return null;
    }
}

